#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QThread>
#include <typedef.h>
#include "cansetmodel.h"
#include "candatabase.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:

    void CloseWin();

    void UpdataReceive(CanDataBase * cdb);

    void on_Btn_connect_2_clicked();

    //void on_Btn_Reset_2_clicked();

    void on_Btn_clean_2_clicked();

signals:
    void StartDataReceive();

private:
    Ui::MainWindow *ui;


    CanSetModel *CanSet;

    QThread *myThread;

    QString BaudRate;
};

typedef struct _DeviceInfo
{
    QString name;
    UINT device_type;  //设备类型
    UINT channel_count;//设备的通道个数
}DeviceInfo;


typedef struct _BaudRateInfo
{
    QString name;       //名称
    QString value;      //波特率值
}BaudRateInfo;



#endif // MAINWINDOW_H
